home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / modelers / geomview / source.lha / Geomview / include / geomclass_sm.h < prev    next >
C/C++ Source or Header  |  1992-02-25  |  1KB  |  30 lines

  1. /* Copyright (c) 1992 The Geometry Center; University of Minnesota
  2.    1300 South Second Street;  Minneapolis, MN  55454, USA;
  3.    
  4. This file is part of geomview/OOGL. geomview/OOGL is free software;
  5. you can redistribute it and/or modify it only under the terms given in
  6. the file COPYING, which you should have received along with this file.
  7. This and other related software may be obtained via anonymous ftp from
  8. geom.umn.edu; email: software@geom.umn.edu. */
  9.  
  10. /* Authors: Charlie Gunn, Stuart Levy, Tamara Munzner, Mark Phillips */
  11.  
  12. #ifndef _GEOMCLASS_SM_
  13. #define _GEOMCLASS_SM_
  14.  
  15. #define    IsInSM(addr, sm)   ((sm)->sm_base <= (char *)(addr) && \
  16.                  (char *)(addr) < (sm)->sm_base + (sm)->sm_mapped)
  17.  
  18. #define    GeomRefreshSM(sm)  ((sm)->sm_mapped < ROOTSYM(sm)->s_size ? GeomRemapSM(sm) : (sm)->sm_mapped)
  19.  
  20. #define    ROOTSYM(sm)    ((GeomSMSym *)(sm)->sm_base)
  21.  
  22. #define    GOffset(sym, type, ptr)  ((type *)(((char *)(ptr)) + \
  23.                    (((char *)(sym)) - (sym)->s_here)))
  24.  
  25. #define    MAXSM        4    /* Max number of simultaneous shared mem's */
  26.  
  27. #define    SM_MAGIC  0x4AB3B8B9    /* s_version field for SM root symbol */
  28.  
  29. #endif _GEOMCLASS_SM_
  30.